<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
		<script type="text/javascript" src="tgd/Simulations/Zombies/Controller.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/View.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/Simulation.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/Person.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/Physics.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/Vision.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/HumanBrain.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/HunterBrain.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/ZombieBrain.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/Enums.js"></script>
		<script type="text/javascript" src="tgd/Simulations/Zombies/Weapon.js"></script>
		<title>Zombie Attack</title>
		<script type="text/javascript">
			//<![CDATA[

			function init() {
				xxx = new tgd.Simulations.Zombies.Controller(document.getElementById("canvas").clientWidth, document.getElementById("canvas").clientHeight, new tgd.Simulations.Zombies.View(document.getElementById("canvas")));
				xxx.add(4, tgd.Simulations.Zombies.Enums.HumanType.Zombie);
				xxx.add(35, tgd.Simulations.Zombies.Enums.HumanType.Civilian);
				xxx.add(7, tgd.Simulations.Zombies.Enums.HumanType.Hunter);
				//xxx.add(1, tgd.Simulations.Zombies.Enums.HumanType.Hunter);
				xxx.start();
			}

			//]]>
		</script>

		<style type="text/css">
			body,html{margin:0;height:100%;width:100%;background:#000;}
			#menucontainer{position:absolute;top:0;right:0;z-index:3;}
			#menucontainer #menutoggle{text-align:right;}
			#menucontainer #menutoggle span{background:#1c1c1c;color:#a4c639;border:solid 1px #4D4D4D;border-top:none;margin-right:10px;padding:0 5px 5px;}
			#menucontainer #menu{color:#4D4D4D;font-family:consolas;padding:0 0 5px 5px;border-left:solid 1px #4D4D4D;border-bottom:solid 1px #4D4D4D;}
			#menucontainer #menu input{background:#4D4D4D;margin:0;padding:2px 5px;border:solid 1px #1C1C1C;color:#A4C639;font-weight:bold;font-family:consolas,monospace;line-height:1em;font-size:.8em;}
			#menucontainer #menu fieldset{background:#1c1c1c;border:solid 1px #4d4d4d}
			#menucontainer #menu fieldset legend{color:#a4c639;}
			#canvas{height:100%;width:100%;margin:0 auto;position:relative;overflow:hidden;}
			#canvas div{position:absolute;height:1px;width:1px;border:solid #1c1c1c;z-index:1;opacity:.4;}
			#canvas div.civ{background:#0F0;border-width:48px;padding:2px;-moz-border-radius:50px;}
			#canvas div.hun{background:blue;border-width:30px;padding:20px;-moz-border-radius:50px;}
			#canvas div.zom{background:red;border-width:80px;padding:20px;-moz-border-radius:100px;}
			#canvas div.dead{border-color:#000;z-index:0;}
		</style>
	</head>
	<body id="body" onload="init();">
		<div id="menucontainer">
			<div id="menu" style="display:none;">
				<div>
					<input type="button" value="|>" onclick="xxx.start();" />
					<input type="button" value="[]" onclick="xxx.stop();" />
				</div>
				<fieldset>
					<legend>Civilians</legend>
					<label for="txtNumCivs">#</label>
					<input id="txtNumCivs" type="text" maxlength="3" size="3" />
					<br />
					<label for="txtCivsFOV">FOV</label>
					<input id="txtCivsFOV" type="text" maxlength="3" size="3" />
					<br />
					<input type="button" value="+" onclick="xxx.add(document.getElementById('txtNumCivs').value, tgd.Simulations.Zombies.Enums.HumanType.Civilian);" />
				</fieldset>
				<fieldset>
					<legend>Hunters</legend>
					<label for="txtNumHuns">#</label>
					<input id="txtNumHuns" type="text" maxlength="3" size="3" />
					<br />
					<label for="txtHunsFOV">FOV</label>
					<input id="txtHunsFOV" type="text" maxlength="3" size="3" />
					<br />
					<input type="button" value="+" onclick="xxx.add(document.getElementById('txtNumHuns').value, tgd.Simulations.Zombies.Enums.HumanType.Hunter);" />
				</fieldset>
				<fieldset>
					<legend>Zombies</legend>
					<label for="txtNumZoms">#</label>
					<input id="txtNumZoms" type="text" maxlength="3" size="3" />
					<br />
					<label for="txtZomsFOV">FOV</label>
					<input id="txtZomsFOV" type="text" maxlength="3" size="3" />
					<br />
					<input type="button" value="+" onclick="xxx.add(document.getElementById('txtNumZoms').value, tgd.Simulations.Zombies.Enums.HumanType.Zombie);" />
				</fieldset>
			</div>
			<div id="menutoggle" onclick="document.getElementById('menu').style.display = (document.getElementById('menu').style.display == 'none' ? '' : 'none');">
				<span>Menu</span>
			</div>
		</div>
		<div id="canvas"></div>
	</body>
</html>
